<?php
namespace app\modules\api\models;

use yii;
use yii\db\Query;

class Income_type
{
    private $table;

    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix.'income_type';
    }

    /**
     * 返回所有收入方式
     */
    public function get_type()
    {
        $db = new Query();
        return $db->select('*')->from($this->table)->all();
    }
}